/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controllers.process;

import controllers.entity.DeTai;
import models.DeTaiDAO;
import java.util.List;
/**
 *
 * @author LinhNT
 */
public class DeTaiProcess {
    
    private static DeTaiDAO deTaiDAO = new DeTaiDAO();
    
    public List<DeTai> getlAllDeTai(int macanbo) { 
        return deTaiDAO.getAllDeTaiByMaCanBo(macanbo);
     }
    
    public static boolean insertDeTai(DeTai X){
        return deTaiDAO.InsertDeTai(X);
    }
    
    public static boolean updateDeTai(DeTai X){
        return deTaiDAO.UpdateDeTai(X);
    }
    
    public static boolean deleteDeTaiByMaDeTai(String MaDeTai){
        return deTaiDAO.DeleteDeTaiByMaDeTai(MaDeTai);
    }
    public static int getCountDetai(){
        return deTaiDAO.getCountDetai();
    }
}
